<!--suppress ALL -->
<template>
</template>
<script>
  import {Cell, XButton, Badge, Group, Alert} from 'vux'
  import base64 from "../../base64"
  export default {
    data(){
      return {
        userGuid: this.$route.params.guid,
        url:  this.$route.params.url
      }
    },
    created() {
      this.initData();
    },
    methods: {
      initData: function () {
        let _self = this;
        this.axios({
          method: 'get',
          url:  global.memberApiUrl +'/member/' + _self.userGuid
        })
          .then(function (response) {
            if (response.status == "200" && response.data.succ) {
              var member = response.data.data;
              _self.$store.dispatch("userSignin", {
                guid: member.guid,
                accountId: member.accountId,
                realName: member.realName,
                openId: member.wxOpenId,
                memberStatus: member.memberStatus  //是否实名认证 0未认证1已认证-1未通过
              });
              window.location.href=base64.decode(_self.url);
            }
          })
          .catch(function (response) {
            console.log("跳转失败");
          });
      },
    },
    components: {
      Group,
      XButton,
      Badge,
      Cell,
      Alert
    }
  }
</script>
